package com.ftg.learn.controller;

import com.ftg.learn.entity.Teacher;
import com.ftg.learn.mapper.TeacherMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author kangjx
 * @createTime 2022/12/30
 */
@RestController
public class Demo01Controller {

//    @Autowired
//    Person person;
//
//    @GetMapping("/myinfo")
//    public String naocConfig() {
//        System.out.println(person.getName() + "姓名==?");
//        System.out.println(person.getAge() + "年龄==?");
//        return person.toString();
//    }

    @Autowired
    TeacherMapper teacherMapper;

    @GetMapping("/show")
    public List<Teacher> abc(){
        return teacherMapper.selectList(null);
    }

}
